<template>
	<view class="content">
		<view
			style="background: transparent;margin-bottom: 17rpx;padding: 110rpx 303rpx 33rpx 43rpx;display: flex;justify-content: space-between;align-items: center;">
			<view>
				<u-icon name="arrow-left" size="36rpx" color="#fff" @click="Goback"></u-icon>
			</view>
			<view style="font-size: 36rpx;font-weight: bold;color: #FFFFFF;">
				商品详情
			</view>
		</view>
		<view class="content-top">

			<!-- 轮播图 -->
			<view class='swiper' style="position: relative;">
				<swiper class="swiper-c" :indicator-dots="false" :autoplay="swiper.autoplay" :interval="swiper.interval"
					@change="changeIn" :duration="swiper.duration">
					<swiper-item v-for="(item, index) in goodsInfo.album" :key="index" @click="clickImg(item)">
						<image class='' :src='item' mode="aspectFill" style="border-radius: 20rpx;"></image>
					</swiper-item>
				</swiper>
				<view class="numss" v-if="goodsInfo.album">
					{{IIndex+1}}/{{goodsInfo.album.length}}
				</view>
			</view>
			<!-- 轮播图end -->

			<view class='cell-group' style="padding:20rpx;">
				<view class='cell-item goods-top'>
					<view class='cell-item-hd'>
						<view class='cell-hd-title goods-price'
							style="font-size:36rpx;color: #F2D7AA;font-weight: bold;">
							{{GGG.sell_point}}<text style="font-size: 28rpx;font-weight: 500;">积分</text>
						</view>
					</view>
				</view>

				<view class='cell-item goods-details' style="border: none;">
					<view class='cell-item-hd'>
						<view class='cell-hd-title'>
							<view class='two-hide'
								style="margin-bottom: 20rpx;color: #fff;font-size: 32rpx;margin-top: 15rpx;line-height: 46rpx;">
								{{ product.name || '' }}
							</view>
							<text v-if="goodsInfo.brief" style="font-size: 26rpx;color: #F2D7AAFF;">
								{{ goodsInfo.brief || '' }}
							</text>
						</view>
					</view>
				</view>
				<view
					style="display: flex;align-items: center;justify-content: space-between;font-size: 24rpx;color: #999999;margin-top: 35rpx;">
					<text>快递 包邮</text>
					<text>已售{{goodsInfo.buy_count > 99 ? '99+' : goodsInfo.buy_count}}件</text>
				</view>
				
			</view>
			<!-- 规格 -->
			<view class='cell-item goods-title-item cell-item-mid'
				style="height: 120rpx;box-shadow: 0rpx 10rpx 40rpx rgba(0,0,0,0.53);background: #202126;border-radius: 20rpx;margin-top: 20rpx;padding: 0 20rpx;"
				v-if="isSpes">
				<view class='cell-item-hd'>
					<view class='cell-hd-title' style="color: #fff;">规格</view>
				</view>
				<view class='cell-item-bd' @click="toshow()">
					<text class='cell-bd-text' style="color: #B9B9B9FF;">{{ product.spes_desc || ''}}</text>
				</view>
			</view>
			<!-- 规格end -->
			
			
			
			<view >
				<!-- 收货地址信息 -->
				<view class="cell-group margin-cell-group" style="margin:20rpx 0;padding: 30rpx 0;;border-radius: 25rpx;"
					v-if="userShip && userShip.id" @click="showAddressList">
					<view class="cell-item add-title-item right-img cell-item-mid" style="margin: 0 30rpx;">
			
						<view class="cell-item-bd cell-item-bd-block">
			
							<view class="cell-bd-view">
								<view class="cell-item-hd">
									<image src="/static/dw.png" style="width: 24upx;height: 29upx;">
									</image>
								</view>
								<text class="cell-bd-text address">{{ userShip.area_name || '' }}
									{{ userShip.address || '' }}</text>
							</view>
							<view class="cell-bd-view">
								<view class="cell-bd-text"
									style="font-size: 27rpx;color: #B9B9B9FF;margin-left: 34rpx;">
									{{ userShip.name || '' }} {{ userShip.mobile || '' }}
								</view>
							</view>
						</view>
						<view class="cell-item-ft">
							<image class="cell-ft-next icon" src="/static/image/right.png"></image>
						</view>
					</view>
				</view>
				<view class="cell-group margin-cell-group" v-else>
					<view class="cell-item add-title-items"><button class="btn btn-b" @click="goAddress()"
							hover-class="btn-hover2">添加收货地址</button></view>
				</view>
			</view>
			
			
			
			
			
			
			
			<view
				style="padding: 44rpx 20rpx 20rpx;background: #202126;color: #FFFFFF;margin-top: 20rpx;border-radius: 20rpx 20rpx 0 0 ;">
				商品详情
			</view>
			<view class="goods-detail">
				<jshopContent :content="goodsInfo.intro" v-if="goodsInfo.intro"></jshopContent>
				<view class="comment-none" v-else>
					<image class="comment-none-img" src="/static/image/order.png" mode=""></image>
				</view>
			</view>
		</view>
		<view style="height: 100rpx;">

		</view>


		<div id="qrCode" ref="qrCodeDiv"></div>
		<!-- 底部按钮 -->
		<view class="goods-bottom" style="display: flex;align-items: center;">
			<button
				style="width: 100%;height: 72upx;background-color: #efd3a5;color: #000;line-height: 72upx;border-radius: 10rpx;font-size: 28rpx;"
				v-if="product.stock" @click="toshow()">立即购买</button>
			<button
				style="width: 409upx;height: 72upx;background-color: #efd3a5;color: #000;line-height: 72upx;border-radius: 10rpx;font-size: 28rpx;"
				v-else>已售罄</button>
		</view>
		<!-- 弹出层 -->
		<lvv-popup position="bottom" ref="lvvpopref">
			<view style="width: 100%;max-height: 804upx;background: #202226;position: absolute;left:0;bottom: 0;">
				<view class="pop-c">
					<view class="pop-t" style="padding: 26rpx;">
						<view class='goods-img'>
							<image :src='product.image_path' mode='aspectFill'></image>
						</view>
						<view class='goods-information'>
							<view class='pop-goods-name' style="margin-bottom: 6rpx;">{{ product.name || ''}}</view>
							<view class='cell-hd-title goods-price'
								style="font-size:36rpx;color: #F2D7AA;font-weight: bold;">
								{{GGG.sell_point}}<text style="font-size: 28rpx;font-weight: 500;">积分</text>
							</view>
						</view>
						<view class='close-btn' @click="toclose()">
							<image src='/static/image/close.png'></image>
						</view>
					</view>
					<scroll-view class="pop-m" scroll-y="true" style="max-height: 560upx;">
						<spec :spesData="defaultSpesDesc" ref="spec" @changeSpes="changeSpes"></spec>
						<view class="goods-number">
							<text class="pop-m-title">数量</text>
							<view class="pop-m-bd-in">
								<uni-number-box :min="minNums" :max="GGG.nums" :value="buyNum"
									@change="bindChange"></uni-number-box>
							</view>
						</view>
					</scroll-view>
					<view class="">
						<button class='btn btn-square btn-b btn-all' style="width: 100%;height: 72upx;background-color: #efd3a5;color: #000;line-height: 72upx;border-radius: 10rpx;font-size: 28rpx;" hover-class="btn-hover2" @click="clickHandle()"
							:disabled='submitStatus' :loading='submitStatus' v-if="product.stock">确定</button>
						<button class='btn btn-square btn-g btn-all' style="width: 100%;height: 72upx;background-color: #efd3a5;color: #000;line-height: 72upx;border-radius: 10rpx;font-size: 28rpx;" v-else>已售罄</button>
					</view>
				</view>
			</view>
		</lvv-popup>
		<!-- 弹出层end -->
	</view>
</template>

<script>
	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue";
	import lvvPopup from '@/components/lvv-popup/lvv-popup.vue';
	import uniNumberBox from "@/components/uni-number-box/uni-number-box.vue";
	import uniRate from "@/components/uni-rate/uni-rate.vue";
	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	import uniFab from '@/components/uni-fab/uni-fab.vue';
	import {
		get
	} from '@/config/db.js';
	import {
		apiBaseUrl
	} from '@/config/config.js'
	import spec from '@/components/spec/spec.vue'
	// #ifdef H5
	import shareByH5 from '@/components/share/shareByh5.vue'
	// #endif
	// #ifdef APP-PLUS || APP-PLUS-NVUE
	import shareByApp from '@/components/share/shareByApp.vue'
	// #endif
	import jshopContent from '@/components/jshop/jshop-content.vue' //视频和文本解析组件
	import {
		h5Url
	} from '@/config/config.js'

	export default {
		components: {
			uniSegmentedControl,
			lvvPopup,
			uniNumberBox,
			uniRate,
			uniLoadMore,
			uniFab,
			spec,
			jshopContent,
			// #ifdef H5
			shareByH5,
			// #endif
			// #ifdef APP-PLUS || APP-PLUS-NVUE
			shareByApp,
			// #endif
		},
		data() {
			return {
				userShip: {}, // 用户收货地址
				GGG: {},
				IIndex: 0,
				scrollData: {},
				barTitle: '',
				swiper: {
					indicatorDots: true,
					autoplay: true,
					interval: 3000,
					duration: 800,
				}, // 轮播图属性设置
				items: ['图文详情', '商品参数', '买家评论'],
				current: 0, // init tab位
				goodsId: 0, // 商品id
				goodsInfo: {}, // 商品详情
				cartNums: 0, // 购物车数量
				product: {}, // 规格详情
				goodsParams: [], // 商品参数信息
				goodsComments: {
					loadStatus: 'more',
					page: 1,
					limit: 5,
					list: []
				}, // 商品评论信息
				buyNum: 1, // 选定的购买数量
				minBuyNum: 1, // 最小可购买数量
				type: 2, // 1加入购物车 2购买
				isfav: false, // 商品是否收藏
				favLogo: [
					'/static/x.png',
					'/static/sx.png'
				],
				horizontal: 'right', //右下角弹出按钮
				vertical: 'bottom',
				direction: 'vertical',
				pattern: {
					color: '#7A7E83',
					backgroundColor: '#fff',
					selectedColor: '#007AFF',
					buttonColor: "#FF7159"
				},
				content: [{
						iconPath: '/static/image/tab-ic-hom-selected.png',
						selectedIconPath: '/static/image/tab-ic-hom-unselected.png',
						// text: '首页',
						active: false,
						url: '/pages/index/index'
					},
					{
						iconPath: '/static/image/tab-ic-me-selected.png',
						selectedIconPath: '/static/image/tab-ic-me-unselected.png',
						// text: '个人中心',
						active: false,
						url: '/pages/member/index/index'
					}
				],
				submitStatus: false,
				config: '', //配置信息
				goodsShowWord: [],
				shareUrl: '/pages/share/jump',
				userInfo: {}, // 用户信息
				Pid: ''
			}
		},
		onLoad(options) {
			//获取商品ID
			if (options.id != '') {
				this.goodsId = options.id - 0;
			}
			this.Pid = options.pid - 0
			if (this.goodsId) {
				this.getGoodsDetail();
			} else {
				this.$common.errorToShow('获取失败', () => {
					uni.navigateBack({
						delta: 1
					});
				});
			}
			// 获取购物车数量
			this.$api.shopConfig(res => {
				this.config = res;
				// console.log(res)
				this.goodsShowWord = res.goods_show_word;
			});
			var _this = this
			if (this.$db.get('userToken')) {
				this.$api.userInfo({}, res => {
					if (res.status) {
						_this.userInfo = res.data
					}
				})
			};
			this.userDefaultShip();
		},
		onShow() {
			let user_ship = this.$db.get('address_user_ship', true);
			if (user_ship) {
				this.userShip = user_ship;
				this.params.area_id = user_ship.area_id;
				this.$db.del('address_user_ship', true);
			}
			this.submitStatus = false;
		},
		computed: {
			isSpes() {
				if (this.product.hasOwnProperty('default_spes_desc') && Object.keys(this.product.default_spes_desc)
					.length) {
					return true;
				} else {
					return false;
				}
			},
			// 规格切换计算规格商品的 可购买数量
			minNums() {
				if (this.product.stock == 0) {
					this.buyNum = 0
					return 0
				} else {
					return this.product.stock > this.minBuyNum ? this.minBuyNum : this.product.stock;
				}
			},
			defaultSpesDesc() {
				return this.product.default_spes_desc;
			}
		},
		methods: {
			changeSpes(obj) {
				let index = obj.v;
				let key = obj.k;
			
				let userToken = this.$db.get('userToken');
				let tmp_default_spes_desc = JSON.parse(this.product.default_spes_desc);
				if (tmp_default_spes_desc[index][key].hasOwnProperty('product_id') && tmp_default_spes_desc[index][key]
					.product_id) {
					// this.$refs.spec.changeSpecData();
					this.$api.getProductInfo({
						id: tmp_default_spes_desc[index][key].product_id,
						token: userToken
					}, res => {
						if (res.status == true) {
							// 切换规格判断可购买数量
							this.buyNum = res.data.stock > this.minBuyNum ? this.minBuyNum : res.data.stock;
							this.product = this.spesClassHandle(res.data);
						}
					});
					uni.showLoading({
						title: '加载中'
					});
					setTimeout(function() {
						uni.hideLoading();
					}, 1000);
				}
			},
			// 购买数量加减操作
			bindChange(val) {
				this.buyNum = val;
			},
			toshow() {
				this.$refs.lvvpopref.show();
			},
			// 关闭modal弹出框
			toclose() {
				this.$refs.lvvpopref.close();
			},
			// 跳转我的收货地址列表
			showAddressList() {
				this.$common.navigateTo('/pages/member/address/list?type=order');
			},
			goAddress() {
				uni.navigateTo({
					url: '/pages/member/address/list?type=order'
				});
			},
			
			// 获取用户的默认收货地址
			userDefaultShip() {
				this.$api.userDefaultShip({}, res => {
					if (res.status && Object.keys(res.data).length) {
						this.userShip = res.data;
						this.params.area_id = this.userShip.area_id;
					}
				});
			},
			changeIn(e) {
				this.IIndex = e.detail.current
			},
			Goback() {
				uni.navigateBack()
			},
			
			GoodsPrice() {
				this.$api.pointChujuDetail({
					id: this.Pid
				}, res => {
					this.GGG = res.data
				})
			},
			// 获取商品详情
			getGoodsDetail() {
				let data = {
					id: this.goodsId
				}

				// 如果用户已经登录 要传用户token
				let userToken = this.$db.get("userToken");

				if (userToken) {
					data['token'] = userToken;
				}

				this.$api.goodsDetail(data, res => {
					if (res.status == true) {
						let info = res.data;
						let products = res.data.product;
						this.GoodsPrice()
						//var htmlString = info.intro; //replace(/\\/g, "").replace(/<img/g, "<img style=\"display:none;\"")
						//info.intro = htmlParser(htmlString);
						this.goodsInfo = info;
						this.isfav = this.goodsInfo.isfav === 'true' ? true : false;
						this.product = this.spesClassHandle(products);

						// 分享朋友和朋友圈
						// #ifdef H5
						if (this.$common.isWeiXinBrowser()) {
							this.shareAll()
						}
						// #endif

					} else {
						this.$common.errorToShow(res.msg, () => {
							uni.navigateBack({
								delta: 1
							});
						})
					}
				})
			},
			// 显示modal弹出框
			toshow(type) {
				this.type = type;
				this.$refs.lvvpopref.show();
			},
			
			// 多规格样式统一处理
			spesClassHandle(products) {
				// 判断是否是多规格 (是否有默认规格)
				if (products.hasOwnProperty('default_spes_desc')) {
					let spes = products.default_spes_desc;
					console.log(spes)
					for (let key in spes) {
						for (let i in spes[key]) {
							if (spes[key][i].hasOwnProperty('is_default') && spes[key][i].is_default === true) {
								this.$set(spes[key][i], 'cla', 'pop-m-item selected');
							} else if (spes[key][i].hasOwnProperty('product_id') && spes[key][i].product_id) {
								this.$set(spes[key][i], 'cla', 'pop-m-item not-selected');
							} else {

								this.$set(spes[key][i], 'cla', 'pop-m-item none');
							}
						}
					}
					spes = JSON.stringify(spes).replace(/\./g, '====');
					/* spes = JSON.stringify(spes) */
					products.default_spes_desc = spes;
				}
				return products;
			},
			
			// 立即购买
			buyNow() {
				this.$common.navigateTo('/pages/point/order?id=' + this.Pid + '&pid=' + this.goodsId);
			},
			
			// 点击弹出框确定按钮事件处理
			clickHandle() {
				this.submitStatus = true;
				if(!this.userShip.id)
				{
					uni.showToast({
						title: '请先完善收货信息',
						icon: 'none',
					})
					return;
				}
				let that = this
				uni.showModal({
					content: '您确定购买此商品吗？',
					success(res) {
						if (res.confirm) {
							that.toPay()
						}
					}
				})
			},
			toPay() {
				this.$api.pointChujuOrder({
					id: this.GGG.id,
					num:this.buyNum,
					product_id: this.GGG.product_id,
					uship_id: this.userShip.id
				}, res => {
					if (res.status) {
						uni.showToast({
							title: '购买成功',
							success() {
								setTimeout(() => {
									uni.redirectTo({
										url: '/pages/member/order/orderlist'
									})
								}, 1500)
							}
						})
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none',
						})
					}
				})
			},
			// 图片点击放大
			clickImg(imgs) {
				// 预览图片
				uni.previewImage({
					urls: imgs.split()
				});
			},
			
		},
		watch: {
			goodsInfo: {
				handler() {

				},
				deep: true
			}
		},
		//分享
		onShareAppMessage() {
			return {
				title: this.goodsInfo.name,
				// #ifdef MP-ALIPAY
				desc: this.goodsInfo.brief,
				// #endif
				imageUrl: this.goodsInfo.album[0],
				path: this.shareUrl
			}
		},
		onHide() {
			uni.hideLoading()
		},
		onPageScroll(e) {
			this.barTitle = e.scrollTop > 100 ? '商品详情' : ''
			this.scrollData = e
		},
	}
</script>

<style>
	::v-deep .uni-numbox {
		background-color: #181818;
		border: 1px solid #F2D7AA;
	}

	::v-deep .uni-numbox__minus {
		color: #B9B9B9FF;
		font-size: 30rpx;
		line-height: 40rpx;
	}

	::v-deep .uni-numbox--disabled {
		color: #333;
		font-size: 30rpx;
		line-height: 40rpx;
	}

	::v-deep .uni-numbox__value {
		width: 68rpx;
		background-color: #181818;
		color: #fff;
		border-left: 1px solid #F2D7AA;
		border-right: 1px solid #F2D7AA;
	}

	::v-deep .uni-numbox__plus {
		color: #B9B9B9FF;
		font-size: 30rpx;
		line-height: 40rpx;
	}

	.content-top {
		padding-bottom: 40rpx;
		margin: 0 30rpx;
	}

	.swiper {
		height: 750upx;
	}

	.goods-top {
		border-bottom: 0;
	}

	.goods-top .goods-price {
		font-size: 38upx;
	}

	.cost-price {
		font-size: 28upx !important;
		bottom: -10upx;
		color: #999;
		text-decoration: line-through;
	}

	.goods-top .cell-item-ft {
		font-size: 20upx;
		color: #666;
	}

	.goods-details {
		padding-top: 0;
	}

	.goods-details .cell-hd-title {
		width: 620upx;
	}

	.goods-details .cell-hd-title .cell-hd-title-view {
		width: 100%;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.goods-details .cell-hd-title .cell-hd-title-view:last-child {
		margin-top: 10upx;
	}

	.goods-details .cell-item-ft {
		top: 24upx;
	}

	.goods-title-item .cell-item-hd {
		min-width: 60upx;
		color: #666;
		font-size: 24upx;
	}

	.goods-title-item .cell-item-bd {
		color: #333;
		font-size: 24upx;
		display: block;
	}

	.goods-title-item .cell-bd-text {
		bottom: 0;
	}

	.cell-bd-view {
		position: relative;
		overflow: hidden;
		margin-bottom: 8upx;
	}

	.cell-bd-view:last-child {
		margin-bottom: 0;
	}

	.goods-title-item-ic {
		width: 22upx;
		height: 22upx;
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		/* #ifdef MP-ALIPAY */
		background-size: 100% 100%;
		/* #endif */
	}

	.cell-bd-view .cell-bd-text {
		margin-left: 30upx;
	}

	.goods-content {
		margin-top: 26upx;
		background-color: #fff;
		padding: 26upx 0;
	}

	.goods-content-c {
		margin-top: 20upx;
	}

	.goods-parameter {
		padding: 10upx 26upx;
		min-height: 600rpx;
	}

	.goods-bottom,
	.pop-b {
		background-color: #202126;
		position: fixed;
		bottom: 0;
		width: 100%;
		overflow: hidden;
		padding: 30rpx 31rpx 63rpx;
	}

	.cell-item {
		background-color: transparent;
		min-height: 0;
		padding: 0;
		border: none;
	}

	.cell-group {
		background-color: #202126;
		margin-top: 20rpx;
		border-radius: 20rpx;
	}

	.goods-bottom .btn {
		height: 100%;
		width: 29%;
		float: left;
	}

	.goods-bottom-ic {
		display: inline-block;
		position: relative;
		text-align: center;
		height: 100%;
		float: left;
		font-size: 22upx;
		color: #666;
	}

	.goods-bottom-ic .icon {
		position: relative;
		top: 6upx;
		/* #ifdef MP-ALIPAY */
		background-size: 100% 100%;
		/* #endif */
	}

	.goods-bottom .btn-g {
		color: #333;
		background-color: #D9D9D9;
	}

	.goods-parameter .cell-item {
		border-bottom: none;
		margin-left: 0;
	}

	.goods-parameter .cell-item-hd {
		color: #333;
		font-size: 24upx;
	}

	.goods-parameter .cell-item-bd {
		color: #999;
	}

	.goods-parameter .cell-item-bd .cell-bd-text {
		bottom: 0;
	}

	.goods-parameter .cell-bd-text {
		margin-left: 0;
	}

	.numss {
		position: absolute;
		right: 20rpx;
		bottom: 20rpx;
		color: #fff;
		padding: 2rpx 36rpx;
		background-color: #00000080;
		border-radius: 25rpx;
	}

	.pop-t {
		position: relative;
		padding: 30upx 26upx;
	}

	.goods-img {
		width: 160upx;
		height: 160upx;
		position: absolute;
		top: -20upx;
		border-radius: 6upx;
		border: 1rpx solid #e5c694;
		border-radius: 20rpx;
	}

	.goods-img image {
		height: 100%;
		width: 100%;
		border-radius: 20rpx;
	}

	.goods-information {
		width: 420upx;
		display: inline-block;
		margin-left: 180upx;
	}

	.pop-goods-name {
		width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		display: block;
		font-size: 24upx;
		margin-bottom: 20upx;
		color: #fff;
	}

	.pop-goods-price {
		font-size: 30upx;
	}

	.close-btn {
		width: 40upx;
		height: 40upx;
		border-radius: 50%;
		display: inline-block;
		position: absolute;
		right: 30upx;
	}

	.close-btn image {
		width: 100%;
		height: 100%;
	}

	.pop-m {
		font-size: 28upx;
		margin-bottom: 200upx;
	}

	.goods-specs,
	.goods-number {
		padding: 26upx;
	}

	.goods-specs:first-child {
		border: none;
	}

	.pop-m-title {
		margin-right: 10upx;
		color: #666;
	}

	.pop-m-bd {
		overflow: hidden;
		margin-top: 10upx;
	}

	.btn-b {
		background-color: #e5c694;
		color: #000;
	}

	.pop-m-item {
		display: inline-block;
		float: left;
		padding: 6upx 16upx;
		background-color: #fff;
		color: #333;
		margin-right: 16upx;
		margin-bottom: 10upx;
	}

	::v-deep .selected {
		border: 2upx solid #6de2d7 !important;
		background-color: #6de2d7 !important;
		color: #fff;
	}

	.not-selected {
		border: 2upx solid #ccc;
	}

	.none {
		border: 2upx dashed #ccc;
		color: #888;
	}

	.pop-m-bd-in {
		display: inline-block;
	}

	.badge {
		top: 2upx;
		left: 62upx;
	}

	.goods-assess .user-head-img {
		width: 80upx;
		height: 80upx;
		border-radius: 50%;
	}

	.goods-assess .cell-item-bd {
		padding-right: 0;
	}

	.goods-assess .cell-bd-text {
		margin: 0;
	}

	.goods-assess .cell-bd-text.color-9 {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		max-width: 440upx;
	}

	.gai-body {}

	.gai-body-text {
		font-size: 26upx;
		color: #333;
		padding: 0 26upx;
		word-wrap: break-word;
	}

	.gai-body-img {
		overflow: hidden;
		padding: 20upx 26upx;
	}

	.gai-body-img image {
		width: 220upx;
		height: 220upx;
		float: left;
		margin-right: 19upx;
		margin-bottom: 18upx;
	}

	.gai-body-img image:nth-child(3n) {
		margin-right: 0;
	}

	.redstar {
		width: 24rpx;
		height: 24rpx;
		padding: 2rpx;
	}

	.mask-share-wechat {
		display: inline-block;
		background-color: #fff;
		padding: 0;
	}

	.mask-share-wechat:after {
		border: none;
	}

	.right-ball {
		position: fixed;
		right: 30upx;
		bottom: 300upx;
		z-index: 999;
		text-align: center;
		padding: 14upx 0;
		width: 80upx;
		height: 80upx;
		font-size: 24upx;
		color: #fff;
		background-color: rgba(0, 0, 0, .5);
		border-radius: 50%;
	}

	.comment-none {
		text-align: center;
		padding: 160upx 0;
	}

	.comment-none-img {
		width: 274upx;
		height: 274upx;
	}


	.price-salesvolume {
		width: 100%;
		padding: 0 0 0 26upx;
		overflow: hidden;
		color: #A5A5A5;
		background-color: rgb(252, 226, 80);
		position: relative;
	}

	.commodity-price {
		width: 224upx;
		display: inline-block;
		float: left;
	}

	.current-price {
		font-size: 40upx;
		color: #FF7159;
		display: block;
		line-height: 1.5;
	}

	.cost-price {
		font-size: 26upx;
		text-decoration: line-through;
		display: block;
	}

	.commodity-salesvolume {
		width: 240upx;
		display: inline-block;
		font-size: 22upx;
		float: left;
		padding: 16upx 0;
	}

	.commodity-salesvolume>text {
		display: block;
	}

	.commodity-time-img {
		display: block;
		width: 0;
		height: 0;
		border-width: 48upx 28upx 50upx 0;
		border-style: solid;
		border-color: transparent #FF7159 transparent transparent;
		/*透明 黄 透明 透明 */
		position: absolute;
		top: 0px;
		left: 462upx;
	}

	.commodity-time {
		display: inline-block;
		width: 260upx;
		text-align: center;
		font-size: 24upx;
		background-color: #FF7159;
		padding: 16upx 0 18upx;
		color: rgb(250, 233, 0);
	}

	.commodity-time>text {
		display: block;
	}

	.commodity-day {
		font-size: 22upx;
	}

	.commodity-day>text {
		display: inline-block;
		background-color: rgb(255, 212, 176);
		color: rgb(255, 115, 0);
		padding: 0 6upx;
		border-radius: 6upx;
	}

	.nav-back {
		width: 100%;
		height: 44px;
		/* #ifndef MP-WEIXIN */
		padding: 12px 12px 0;
		/* #endif */
		/* #ifdef MP-WEIXIN */
		padding: 26px 12px 0;
		/* #endif */

		position: fixed;
		top: 0;
		background-color: rgba(255, 255, 255, 0);
		z-index: 98;
	}

	.back-btn {
		height: 32px;
		width: 32px;
		border-radius: 50%;
		background-color: rgba(255, 255, 255, 0.8);
	}

	.back-btn .icon {
		height: 20px;
		width: 20px;
		position: relative;
		top: 50%;
		left: 46%;
		transform: translate(-50%, -50%);
	}

	.seller-content {
		background-color: #f8f8f8;
		margin: 0 13px 15px;
		padding: 10px;
		color: #6e6e6e;
		border-radius: 4px;
	}

	.seller-content-top {
		font-weight: bold;
		margin-bottom: 6px;
	}

	.seller-content-img {
		width: 20px;
		height: 20px;
		vertical-align: middle;
		margin-right: 4px;
	}

	.service {
		width: 80rpx;
		height: 80rpx;
		background-color: #fff;
		border-radius: 50%;
		position: fixed;
		left: 30rpx;
		bottom: 120rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		box-shadow: 0 0 10rpx #ccc;
		padding: 0;
	}

	.service .icon {
		width: 60rpx;
		height: 60rpx;
	}

	/* #ifdef MP-WEIXIN */
	.weiContact {
		background-color: #fff;
		border: none;
	}

	.weiContact::after {
		border: none;
	}

	.weiContact>view {
		position: absolute;
		top: 45rpx;
		left: 50%;
		transform: translateX(-50%);

	}

	/* #endif */
</style>